<?php

	function getPost($url,$parametros = NULL) {
		$parametros = is_array($parametros)?$parametros:array();
		$prm = array();
		foreach($parametros as $k => $v) {
			$prm[] = urlencode($k."=".$v);				
		}		
		$qry_str = implode("&",$prm);
		$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, $url);  
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($ch, CURLOPT_TIMEOUT, '3');
		curl_setopt($ch, CURLOPT_POST, 1);
		curl_setopt($ch, CURLOPT_POSTFIELDS, $qry_str);
		$content = trim(curl_exec($ch));
		curl_close($ch);
		return  $content;
	}
	
	
	//$objeto = getPost("https://api.dropbox.com/1/oauth/request_token");
	$objeto = getPost("https://api.dropbox.com/1/account/info");
	
	print_r($objeto);
	
?>